import requests
from lxml import etree
import asyncio
import aiohttp

# url = "https://api.web.360kan.com/v1/rank?cat=1"

# res = requests.get(url)
# print(res.json)

async def fetch(session, url):
    async with session.get(url) as response:
        item = await response.json()
        print(item)

async def main():
    async with aiohttp.ClientSession() as session:
        urls = [f'https://api.web.360kan.com/v1/rank?cat={i}' for i in range(1, 7)]
        tasks = [fetch(session, url) for url in urls]

        await asyncio.gather(*tasks)

        await asyncio.sleep(1)



asyncio.run(main())